package org.boulderfoodrescue.webapp.client.loadingdialog;

import org.boulderfoodrescue.webapp.client.resources.Resources;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Widget;

public class LoadingDialogView extends Composite{

  private static LoadingDialogPanelUiBinder uiBinder = GWT
      .create(LoadingDialogPanelUiBinder.class);

  interface LoadingDialogPanelUiBinder extends
      UiBinder<Widget, LoadingDialogView> {
  }

  @UiField (provided = true) 
  Image loading_bar;
  @UiField
  Label loading_text;
  
  public LoadingDialogView() {
    Resources resources = GWT.create(Resources.class);
    loading_bar = new Image(resources.loading_bar());
    initWidget(uiBinder.createAndBindUi(this));
    
  }
  public void setLoadingText(String text){
    loading_text.setText(text);
  }
}
